[heos] Fix login failure when password contains special characters#19438
Merged
lsiepel merged 1 commit intoopenhab:mainfrom Oct 11, 2025
Merged
[heos] Fix login failure when password contains special characters#19438lsiepel merged 1 commit intoopenhab:mainfrom
lsiepel merged 1 commit intoopenhab:mainfrom
Conversation
Collaborator
|
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/6-invalid-credentials-when-using-the-heos-binding-2-5-5/103029/11 |
9adf21d to
c65e16b
Compare
c65e16b to
7b6a213
Compare
7b6a213 to
3a105f5
Compare
3a105f5 to
855fbe2
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a login failure issue in the HEOS binding when passwords contain special characters. The previous implementation incorrectly used full URL encoding, which caused authentication errors for passwords containing certain special characters.
- Replaced full URL encoding with selective encoding of only the three special characters required by the HEOS CLI Protocol Specification:
&,=, and% - Added comprehensive test coverage for the new encoding behavior
- Added debug logging for telnet commands
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| HeosCommands.java | Replaced URL encoding with selective encoding of only &, =, and % characters as per HEOS specification |
| HeosCommandsTest.java | Added parameterized tests to verify correct encoding behavior for various password scenarios |
| Telnet.java | Added trace logging for sent commands to aid debugging |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...hab.binding.heos/src/main/java/org/openhab/binding/heos/internal/resources/HeosCommands.java
Show resolved
Hide resolved
Resolves openhab#13445 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
855fbe2 to
c3b39b1
Compare
Contributor
|
Feel free to backport if needed. |
jlaur
added a commit
that referenced
this pull request
Oct 11, 2025
Resolves #13445 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
jlaur
added a commit
that referenced
this pull request
Oct 11, 2025
Resolves #13445 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to the HEOS CLI Protocol Specification only three special characters need to be encoded:
Encoding others will result in status ONLINE (CONFIGURATION_ERROR) with description
#6: Invalid Credentials.Resolves #13445